Links and Images (1/3)
What does the href attribute in <a> do?
    Role of the href Attribute in <a>

    The `href` attribute in the `<a>` (anchor) tag specifies the URL or location that the link should point to. When a user clicks the link, the browser navigates to the resource defined in `href`.

    Key Points about href
    • It defines the destination of the hyperlink (a webpage, file, email address, or part of the same page).
    • If `href` is missing, the `<a>` element won’t work as a link.
    • You can use absolute URLs (e.g., `https://example.com`) or relative URLs (e.g., `/about.html`).
    • Special values like `mailto:someone@example.com` open an email client, and `tel:+123456789` initiates a phone call on supported devices.
    Example Usage

    In short: The `href` attribute defines the target address of a hyperlink, making the `<a>` tag functional.